
#import <UIKit/UIKit.h>

#import "SEGMenuListModel.h"
#define kTabBarItemViewHeight 44     // TwoColumnView的高度
#define kTabBarItemOverHeight 10     // TwoColumnView的超过的高度
//TabBar按钮类型枚举
typedef NS_ENUM(NSUInteger, SEGEnumTabBarItemViewType) {
    SEGEnumTabBarItemViewType_NO = 0, /*默认*/
    SEGEnumTabBarItemViewType_OPENDOOR = 1, /*开门展示按钮*/
    SEGEnumTabBarItemViewType_FreshItem = 2, /*刷新动画*/
    SEGEnumTabBarItemViewType_TOPOPENDOOR = 3, /*凸起的TabItem 开门*/
    SEGEnumTabBarItemViewType_PIC = 4 /*纯大图的TabItem 开门*/
};

@interface SEGTabBarItemViewLayout : NSObject
@property (nonatomic, assign) CGFloat totalHeight;//控件总高度
@property (nonatomic, assign) SEGEnumTabBarItemViewType type;//控件类型
@property (nonatomic, strong)SEGMenuListModel *data;
- (instancetype)initWithData:(SEGMenuListModel *)data type:(SEGEnumTabBarItemViewType)type;
-(void)segTabBarItemViewLayout;

@property (nonatomic, assign) CGFloat contentLabelHeight;//contentLabel 高度
@property (nonatomic, strong) SEGTextLayout *contentLabelTextLayout;//contentLabel 富文本布局
@property (nonatomic, strong) SEGTextLayout *contentLabelTextLayoutPre;//contentLabel 富文本布局

@property (nonatomic, strong) SEGTextLayout *contentLabelTextLayoutFresh;//contentLabel 富文本布局
@end

@interface SEGTabBarItemView : UIView
@property (nonatomic, strong)SEGTabBarItemViewLayout *layout;
- (void)setWithLayout:(SEGTabBarItemViewLayout *)layout;
@property (nonatomic, assign) BOOL isSelected;
-(void)setSelected:(BOOL)isSelected;

@property (nonatomic, strong) SEGLabel *contentLabel; // 主体文本
@property (nonatomic, strong) UIImageView *headImageView; // 展示图片
@property (nonatomic, strong) UIImageView *redImageView; // 红点图片
@property (nonatomic, strong) UIImageView *freshImageView;//刷新控件
@property (nonatomic, strong) UIView *lineView;
@property (nonatomic, strong) UIView *backgroundView;
/**
 * 判断刷新图标是否显示或者隐藏
 * @author Sam
 */
-(void)segFreshImageShow:(BOOL)isShow;

//界面布局
-(void)setupUI;

/**
 * 开门按钮界面
 * @author Sam
 */
-(void)setupOpenDoor;

-(void)setupTopDoor;

-(void)setupNormalOpenDoor;
@end

